import express from "express"
import {deleteUser, dislike, getUser, like, subscribe, unsubscribe, update} from "../controllers/user.js";
import { verifyToken } from "../verifyToken.js";

const router=express.Router();

//更新用户
router.put("/:id",verifyToken,update)
// 删除用户
router.delete("/:id",verifyToken,deleteUser)
// 查询一个用户
router.get("/find/:id",getUser)
// 订阅一个用户
router.put("/sub/:id",verifyToken,subscribe)
// 取消订阅一个用户
router.put("/unsub/:id",verifyToken,unsubscribe)
// 视频点赞
router.put("/like/:videoId",verifyToken,like)
// 取消视频点赞
router.put("/dislike/:videoId",verifyToken,dislike)


export default router; 